<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>命令 | 前言</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="gitbook/style.css">
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="./syntax.html" />
    
    
    <link rel="prev" href="./installation.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="0.2"
        data-chapter-title="命令"
        data-filepath="commands.md"
        data-basepath="."
        data-revision="Wed Apr 27 2016 12:23:04 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="./index.html">
                
                        <i class="fa fa-check"></i>
                        
                        GitBook
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.1" data-path="installation.html">
            
                
                    <a href="./installation.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>0.1.</b>
                        
                        安装
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="0.2" data-path="commands.html">
            
                
                    <a href="./commands.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>0.2.</b>
                        
                        命令
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="0.3" data-path="syntax.html">
            
                
                    <a href="./syntax.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.</b>
                        
                        语法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="0.4" data-path="settings.html">
            
                
                    <a href="./settings.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>0.4.</b>
                        
                        配置
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="0.5" data-path="plugins.html">
            
                
                    <a href="./plugins.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>0.5.</b>
                        
                        插件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="0.6" data-path="bookjson.html">
            
                
                    <a href="./bookjson.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>0.6.</b>
                        
                        json
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="./" >前言</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h2 id="&#x547D;&#x4EE4;">&#x547D;&#x4EE4;</h2>
<p>&#x8FD9;&#x91CC;&#x4E3B;&#x8981;&#x4ECB;&#x7ECD;&#x4E00;&#x4E0B; Gitbook &#x7684;&#x547D;&#x4EE4;&#x884C;&#x5DE5;&#x5177; <code>gitbook-cli</code> &#x7684;&#x4E00;&#x4E9B;&#x547D;&#x4EE4;, &#x9996;&#x5148;&#x8BF4;&#x660E;&#x4E24;&#x70B9;:</p>
<ul>
<li><code>gitbook-cli</code> &#x548C; <code>gitbook</code> &#x662F;&#x4E24;&#x4E2A;&#x8F6F;&#x4EF6;</li>
<li><code>gitbook-cli</code> &#x4F1A;&#x5C06;&#x4E0B;&#x8F7D;&#x7684; gitbook &#x7684;&#x4E0D;&#x540C;&#x7248;&#x672C;&#x653E;&#x5230; <code>~/.gitbook</code>&#x4E2D;, &#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x8BBE;&#x7F6E;<code>GITBOOK_DIR</code>&#x73AF;&#x5883;&#x53D8;&#x91CF;&#x6765;&#x6307;&#x5B9A;&#x53E6;&#x5916;&#x7684;&#x6587;&#x4EF6;&#x5939;</li>
</ul>
<p><strong>&#x5217;&#x51FA;gitbook&#x6240;&#x6709;&#x7684;&#x547D;&#x4EE4;</strong></p>
<pre><code class="lang-bash">gitbook <span class="hljs-built_in">help</span>
</code></pre>
<p><strong>&#x8F93;&#x51FA;<code>gitbook-cli</code>&#x7684;&#x5E2E;&#x52A9;&#x4FE1;&#x606F;</strong></p>
<pre><code class="lang-bash">gitbook --help
</code></pre>
<p><strong>&#x751F;&#x6210;&#x9759;&#x6001;&#x7F51;&#x9875;</strong></p>
<pre><code class="lang-bash">gitbook build
</code></pre>
<p><strong>&#x751F;&#x6210;&#x9759;&#x6001;&#x7F51;&#x9875;&#x5E76;&#x8FD0;&#x884C;&#x670D;&#x52A1;&#x5668;</strong></p>
<pre><code class="lang-bash">gitbook serve
</code></pre>
<p><strong>&#x751F;&#x6210;&#x65F6;&#x6307;&#x5B9A;gitbook&#x7684;&#x7248;&#x672C;, &#x672C;&#x5730;&#x6CA1;&#x6709;&#x4F1A;&#x5148;&#x4E0B;&#x8F7D;</strong></p>
<pre><code class="lang-bash">gitbook build --gitbook=<span class="hljs-number">2.0</span>.<span class="hljs-number">1</span>
</code></pre>
<p><strong>&#x5217;&#x51FA;&#x672C;&#x5730;&#x6240;&#x6709;&#x7684;gitbook&#x7248;&#x672C;</strong></p>
<pre><code class="lang-bash">gitbook ls
</code></pre>
<p><strong>&#x5217;&#x51FA;&#x8FDC;&#x7A0B;&#x53EF;&#x7528;&#x7684;gitbook&#x7248;&#x672C;</strong></p>
<pre><code class="lang-bash">gitbook ls-remote
</code></pre>
<p><strong>&#x5B89;&#x88C5;&#x5BF9;&#x5E94;&#x7684;gitbook&#x7248;&#x672C;</strong></p>
<pre><code class="lang-bash">gitbook fetch &#x6807;&#x7B7E;/&#x7248;&#x672C;&#x53F7;
</code></pre>
<p><strong>&#x66F4;&#x65B0;&#x5230;gitbook&#x7684;&#x6700;&#x65B0;&#x7248;&#x672C;</strong></p>
<pre><code class="lang-bash">gitbook update
</code></pre>
<p><strong>&#x5378;&#x8F7D;&#x5BF9;&#x5E94;&#x7684;gitbook&#x7248;&#x672C;</strong></p>
<pre><code class="lang-bash">gitbook uninstall <span class="hljs-number">2.0</span>.<span class="hljs-number">1</span>
</code></pre>
<p><strong>&#x6307;&#x5B9A;log&#x7684;&#x7EA7;&#x522B;</strong></p>
<pre><code class="lang-bash">gitbook build --log=debug
</code></pre>
<p><strong>&#x8F93;&#x51FA;&#x9519;&#x8BEF;&#x4FE1;&#x606F;</strong></p>
<pre><code class="lang-bash">gitbook builid --debug
</code></pre>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="./installation.html" class="navigation navigation-prev " aria-label="Previous page: 安装"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="./syntax.html" class="navigation navigation-next " aria-label="Next page: 语法"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="gitbook/app.js"></script>

    
    <script src="gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
